package cn.superchart.module.menu.mapper;
import cn.superchart.module.menu.entity.ScMenu;
import cn.superchart.module.menu.param.ScMenuTree;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface ScMenuMapper extends BaseMapper<ScMenu> {

    List<ScMenuTree> getMenus(@Param("userId") String userId, @Param("menuTypes") List<String> menuType, @Param("hideDisable") Boolean hideDisable);

    List<ScMenuTree> getAllMenus( @Param("menuTypes") List<String> menuType,@Param("hideDisable") Boolean hideDisable);

    List<String> getMenuPerms(@Param("userId") String userId, @Param("menuTypes") List<String> menuType, @Param("hideDisable") Boolean hideDisable);

    List<ScMenuTree> listMenus();

    Integer exist(@Param("fieldName") String fieldName,@Param("value") String value, @Param("idVal")  String idVal);

    ScMenu getParent(@Param("pid") String pid);

    List<ScMenu> urlPerm();
}
